package com.smart.model;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

/**
 * 
 * @author Sunxin
 *
 */

@Entity 
@Table(name = "notice") 
public class Notice extends BaseEntity<Notice>{
	private static final long serialVersionUID = 1L;
	/**
	 * 标题
	 */
	@Column(length=500)
	private String title;
	/**
	 * 副标题
	 */
	@Column(length=1024)
	private String title2;
	/**
	 * 内容
	 */
	@Column(length=1024)
	private String content;
	/**
	 * 封面图
	 */
	private String coverImg;
	/**
	 * 是否置顶
	 */
	private boolean isTop;
	/**
	 * 资讯类型 1.新闻 2.问答 3.贷款技巧  4.帮助
	 */
	private int type;
	
	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public String getTitle2() {
		return title2;
	}

	public void setTitle2(String title2) {
		this.title2 = title2;
	}

	public String getContent() {
		if(content==null) {
			return "";
		}
		return content.replaceAll("&lt;", "<").replaceAll("&gt;", ">");
	}

	public void setContent(String content) {
		this.content = content;
	}

	public String getCoverImg() {
		return coverImg;
	}

	public void setCoverImg(String coverImg) {
		this.coverImg = coverImg;
	}

	public boolean getIsTop() {
		return isTop;
	}

	public void setIsTop(boolean isTop) {
		this.isTop = isTop;
	}

	public int getType() {
		return type;
	}

	public void setType(int type) {
		this.type = type;
	}
	/*public String getContentUnEscaped(){
		if(content==null) {
			return "";
		}
		return content.replaceAll("&lt;", "<").replaceAll("&gt;", ">");
	}*/
	
}
